<?php
//echo phpinfo();exit();
header("Content-type: image/jpeg");
$src = imageCreateTrueColor(300,150);
$color = imageColorAllocate($src,153,217,214);
$colorx = imageColorAllocate($src,100,100,214);
imageFill($src,0,0,$color);


for($i=0;$i<300;$i++){
    imagesetpixel($src,mt_rand(10,280),mt_rand(5,140),mt_rand(0,255));
}
for($i=0;$i<5;$i++){
    imageline($src,mt_rand(30,50),mt_rand(20,120),mt_rand(220,280),mt_rand(20,120),mt_rand(0,255));
}

for($i=0;$i<4;$i++){
    $arr=array('a','b','c','d','e','f','g','7','1','3','2','4','9','6','5','8');
    $res=mt_rand(0,count($arr)-1);
    $code=$arr[$res];
    $width=$i*60;
    $width+=18;
    imagettftext($src,mt_rand(40,65),mt_rand(-30,30),$width,mt_rand(80,110),mt_rand(0,255),'./font.ttf',$code);
}

imagejpeg($src);
?>